﻿<Application x:Class="Vision.VisionWorkshop.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="Workshop.xaml">
    <Application.Resources>
        <Style x:Key="CloseButton" TargetType="Button">
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="Margin" Value="10,0,0,0" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid Background="Transparent">
                            <TextBlock x:Name="tbkX" Text="X" Foreground="Black" FontFamily="Microsoft Sans Serif" FontSize="10" FontWeight="Bold" />
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="false">
                                <Trigger.EnterActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetName="tbkX" Storyboard.TargetProperty="Opacity" To=".6" Duration="00:00:00" />
                                        </Storyboard>
                                    </BeginStoryboard>
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Trigger.EnterActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <ColorAnimation Storyboard.TargetName="tbkX" Storyboard.TargetProperty="(Foreground).(SolidColorBrush.Color)" To="OrangeRed" Duration="00:00:00" />
                                        </Storyboard>
                                    </BeginStoryboard>
                                </Trigger.EnterActions>
                                <Trigger.ExitActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <ColorAnimation Storyboard.TargetName="tbkX" Storyboard.TargetProperty="(Foreground).(SolidColorBrush.Color)" To="Black" Duration="00:00:00" />
                                        </Storyboard>
                                    </BeginStoryboard>
                                </Trigger.ExitActions>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Application.Resources>
</Application>
